<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>

<script>
    var type;

  $(function(){
      var visitId = '${patVisit.id}';
      getType('druglist',visitId);
      //loadDiv("perFormTable",'${ctx}/nurse/performSingleBottom?type=druglist&visitId='+visitId);
  });

  function getType(classType,visitId){
    type=classType;
    var url="";
    if(type =="druglist"){
      url='${ctx}/nurse/performSingleBottom?type='+type+'&visitId='+visitId;
    } else if(type =="injection"){
      url='${ctx}/nurse/performSingleBottom?type='+type+'&visitId='+visitId;
    } else if(type =="transfusfuse"){
      url='${ctx}/nurse/performSingleBottom?type='+type+'&visitId='+visitId;
    } else{
      url='${ctx}/nurse/performSingleBottom?type='+type+'&visitId='+visitId;
    }
    loadDiv("perFormTable",url);
  }

  function  printPerform(visitId,patientId){
    if(type==null || type==undefined){
      type="druglist";
    }
      printPdf('${ctx}/nurse/printExeuteReport', 'patientId='+patientId+'&id='+visitId+'&type='+type);

  }
</script>
<div class="row mb25">
  <div class="box-tab">
    <ul class="nav nav-tabs" id="list">
      <li class="active">
        <a href="#home1" data-toggle="tab" aria-expanded="false" onclick="getType('druglist','${patVisit.id}');">服药单</a>
      </li>
      <li>
        <a href="#profile1" data-toggle="tab" aria-expanded="false" onclick="getType('injection','${patVisit.id}');">注射单</a>
      </li>
      <li>
        <a href="#shuye" data-toggle="tab" aria-expanded="false" onclick="getType('transfusfuse','${patVisit.id}');">输液单</a>
      </li>
      <li>
        <a href="#zhil" data-toggle="tab" aria-expanded="false" onclick="getType('treatment','${patVisit.id}');">治疗单</a>
      </li>
    </ul>
    <div class="tab-content text-center">
      <div class="tab-pane fade active in" id="perFormTable">

      </div>
    </div>
  </div>
  <div class="pull-right">
    <input type="button" class="btn btn-primary" value="打印" onclick="printPerform('${patVisit.id}','${patVisit.patientId}')">
  </div>
</div>
